/**
 * 
 */
package it.robertobifulco.ias.rolemanager;

/**
 * The class implements a Role. The Role is characterized by a unique ID (name) and by a set of permissions.
 * Permissions are simply the identifier of the operations conceded to the Role.
 * 
 * The uniquiness of the Role identifier is not ensured by the system, but is leave to user care.
 * 
 * @author Roberto Bifulco oltremago@gmail.com
 *
 */
public class Role {
	
	private String name;
	private String[] operations;
	
	
	/**
	 * Build a Role by its name and its permissions
	 * 
	 * @param name Role identifier
	 * @param operations Role's operations conceded identifiers
	 */
	public Role(String name, String[] operations) {
		super();
		this.name = name;
		this.operations = operations;
	}

	/**
	 * Return the name of the Role
	 * 
	 * @return the name of the Roles
	 */
	public String getName() {
		return name;
	}

	/**
	 * Get the permissions linked to the Role
	 * 
	 * @return a String[] of operations identifier
	 */
	public String[] getOperations() {
		return operations;
	}
	
	

}
